package com.city.repository.city;

import com.city.domain.city.CityHouseinfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @deprecation: 出租房屋信息表
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
public interface CityHouseinfoRepository extends JpaRepository<CityHouseinfo,Integer> {

    @Query(value = "select * from city_houseinfo order by id desc limit ?1,?2", nativeQuery = true)
    List<CityHouseinfo> getHouseinfoLimit(Integer limitPage, Integer limitNum);

    @Query(value = "select * from city_houseinfo where id=?1", nativeQuery = true)
    CityHouseinfo getHouseinfo(Integer id);

}
